<%= form_for(@user) do |f| %>
  <% if @user.errors.any? %>
    <div id="error_explanation">
      <h2><%= pluralize(@user.errors.count, "error") %> prohibited this user from being saved:</h2>

      <ul>
      <% @user.errors.full_messages.each do |msg| %>
        <li><%= msg %></li>
      <% end %>
      </ul>
    </div>
  <% end %>

  <div class="field">
    <%= f.label :username %><br />
    <%= f.text_field :username %>
  </div>
  <div class="field">
    <%= f.label :firstname %><br />
    <%= f.text_field :firstname %>
  </div>
  <div class="field">
    <%= f.label :lastname %><br />
    <%= f.text_field :lastname %>
  </div>
  <div class="field">
    <%= f.label :hashed_password %><br />
    <%= f.text_field :hashed_password %>
  </div>
  <div class="field">
    <%= f.label :email %><br />
    <%= f.text_field :email %>
  </div>
  <div class="field">
    <%= f.label :salt %><br />
    <%= f.text_field :salt %>
  </div>
  <div class="actions">
    <%= f.submit %>
  </div>
<% end %>
